this._windowSlots = [];
this._layout = null;
+ this._needsLayout = true;
+
this._stateAdjustment = new St.Adjustment({
value: 0,
lower: 0,
}
let layoutChanged = false;
- if (!this._layoutFrozen) {
- if (this._layout === null) {
+ if (!this._layoutFrozen || this._needsLayout) {
+ if (this._needsLayout) {
this._layout = this._createBestLayout(this._workarea);
+ this._needsLayout = false;
layoutChanged = true;
}
this._windows.set(window, {
metaWindow,
sizeChangedId: metaWindow.connect('size-changed', () => {
- this._layout = null;
+ this._needsLayout = true;
this.layout_changed();
}),
destroyId: window.connect('destroy', () =>
this._syncOverlay(window);
this._container.add_child(window);
- this._layout = null;
+ this._needsLayout = true;
this.layout_changed();
}
if (window.get_parent() === this._container)
this._container.remove_child(window);
- this._layout = null;
+ this._needsLayout = true;
this.layout_changed();
}
lastWindow = window;
}
- this._layout = null;
+ this._needsLayout = true;
this.layout_changed();
}
this._spacing = s;
- this._layout = null;
+ this._needsLayout = true;
this.notify('spacing');
this.layout_changed();
}